Package-level declarations

Types

Link copied to clipboard
class BattleException @JvmOverloads constructor(message: String, cause: Throwable? = null, val notConnected: List<BotIdentity> = emptyList()) : RuntimeException

Thrown when a battle cannot start or fails to complete.

Link copied to clipboard

Handle for an in-progress asynchronous battle.

Link copied to clipboard
data class BattleResults(val numberOfRounds: Int, val results: List<BotResult>)

Structured result returned after a battle completes.

Link copied to clipboard

Entry point for running Tank Royale battles programmatically.

Link copied to clipboard
data class BattleSetup(val gameType: GameType, val arenaWidth: Int, val arenaHeight: Int, val minNumberOfParticipants: Int, val maxNumberOfParticipants: Int?, val numberOfRounds: Int, val gunCoolingRate: Double, val maxInactivityTurns: Int, val turnTimeoutMicros: Int, val readyTimeoutMicros: Int, val defaultTurnsPerSecond: Int = -1)

Immutable battle configuration derived from a game type preset with optional parameter overrides.

Link copied to clipboard
data class BootProgress(val expected: Map<BotIdentity, Int>, val connected: Map<BotIdentity, Int>, val pending: Map<BotIdentity, Int>, val elapsedMs: Long, val timeoutMs: Long)

Snapshot of bot-connection progress during the boot phase of a battle.

Link copied to clipboard
data class BotEntry(val path: Path)

Identifies a bot participant by its directory path on the file system.

Link copied to clipboard
data class BotIdentity(val name: String, val version: String, val authors: String)

Identifies a bot by its name, version, and authors as declared in its bot.json configuration file.

Link copied to clipboard
data class BotResult(val id: Int, val name: String, val version: String, val isTeam: Boolean, val rank: Int, val totalScore: Int, val survival: Int, val lastSurvivorBonus: Int, val bulletDamage: Int, val bulletKillBonus: Int, val ramDamage: Int, val ramKillBonus: Int, val firstPlaces: Int, val secondPlaces: Int, val thirdPlaces: Int)

Score and ranking data for a single bot participant.